package com.hellobike.haxing.modules.product.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.hellobike.haxing.common.vo.Result;
import com.hellobike.haxing.modules.product.entity.PromotionGroup;

/**
 * @Description: 拼团商品
 * @Author: haxing-boot
 * @Date:   2020-01-29
 * @Version: V1.0
 */
public interface IPromotionGroupService extends IService<PromotionGroup> {

    /**
     * 分页查询拼团活动下拼团商品
     * @param page
     * @param queryWrapper
     * @return
     */
    IPage<PromotionGroup> page(Page<PromotionGroup> page, QueryWrapper<PromotionGroup> queryWrapper);

    /**
     * 新增拼团商品
     * @param promotionGroup
     */
    Result savePromotionGroup(PromotionGroup promotionGroup);

    /**
     * 修改拼团商品
     * @param promotionGroup
     */
    Result updatePromotionGroup(PromotionGroup promotionGroup);

    Result changeStatus(Long id, Integer status);

    /**
     * 获取拼团商品详细信息
     * @param id
     * @return
     */
    PromotionGroup getPromotionGroupDetail(Long id);

    Result<?> selectNojoinProducts(Long id, Long productId);

    Result<?> selectProduct(Long promotionId);

    Result changeGroupSkuStock(Long var1, Integer var2);
}
